package routers

import (
	"gotest/controllers"

	"github.com/astaxie/beego"
)

func init() {
	beego.Router("/", &controllers.MainController{})
	beego.Router("/List", &controllers.MainController{}, "get:List")
	beego.Router("/InserUser", &controllers.MainController{}, "post:InserUser")
	beego.Router("/Login", &controllers.MainController{}, "get,post:Login")
	beego.Router("/LogOut", &controllers.MainController{}, "get:LogOut")
	beego.Router("/delete/:id([0-9]+)", &controllers.MainController{}, "*:Delete")
	beego.Router("/Add", &controllers.MainController{}, "get:Add")
	beego.Router("/Edit/:id([0-9]+)", &controllers.MainController{}, "*:Edit")
	beego.Router("/UpdateUser", &controllers.MainController{}, "post:UpdateUser")
	beego.Router("/Record/List/:id([0-9]+)/:page([0-9]+)", &controllers.RecordController{}, "get:List")
	beego.Router("/Record/InserRecord", &controllers.RecordController{}, "post:InserRecord")
	beego.Router("/Record/delete/:id([0-9]+)", &controllers.RecordController{}, "*:Delete")
	beego.Router("/Record/Add/:id([0-9]+)", &controllers.RecordController{}, "get:Add")
	beego.Router("/Record/Edit/:id([0-9]+)", &controllers.RecordController{}, "*:Edit")
	beego.Router("/Record/UpdateRecord", &controllers.RecordController{}, "post:UpdateRecord")
}
